3.162 \(\int (a+b \sec (c+d x)) \sin ^3(c+d x) \, dx\)

Optimal. Leaf size=58 \[ \frac{a \cos ^3(c+d x)}{3 d}-\frac{a \cos (c+d x)}{d}+\frac{b \cos ^2(c+d x)}{2 d}-\frac{b \log (\cos (c+d x))}{d} \]

[Out]

-((a*Cos[c + d*x])/d) + (b*Cos[c + d*x]^2)/(2*d) + (a*Cos[c + d*x]^3)/(3*d) - (b*Log[Cos[c + d*x]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0857308, antiderivative size = 58, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.21, Rules used = {3872, 2837, 12, 766} \[ \frac{a \cos ^3(c+d x)}{3 d}-\frac{a \cos (c+d x)}{d}+\frac{b \cos ^2(c+d x)}{2 d}-\frac{b \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[c + d*x])*Sin[c + d*x]^3,x]

[Out]

-((a*Cos[c + d*x])/d) + (b*Cos[c + d*x]^2)/(2*d) + (a*Cos[c + d*x]^3)/(3*d) - (b*Log[Cos[c + d*x]])/d

Rule 3872

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[((g*C
os[e + f*x])^p*(b + a*Sin[e + f*x])^m)/Sin[e + f*x]^m, x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rule 2837

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^m*(c + (d*x)/b)^n*(b^2 - x^2)^((p - 1)/2), x], x
, b*Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 766

Int[((e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(e*x
)^m*(f + g*x)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, e, f, g, m}, x] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int (a+b \sec (c+d x)) \sin ^3(c+d x) \, dx &=-\int (-b-a \cos (c+d x)) \sin ^2(c+d x) \tan (c+d x) \, dx\\ &=\frac{\operatorname{Subst}\left (\int \frac{a (-b+x) \left (a^2-x^2\right )}{x} \, dx,x,-a \cos (c+d x)\right )}{a^3 d}\\ &=\frac{\operatorname{Subst}\left (\int \frac{(-b+x) \left (a^2-x^2\right )}{x} \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (a^2-\frac{a^2 b}{x}+b x-x^2\right ) \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=-\frac{a \cos (c+d x)}{d}+\frac{b \cos ^2(c+d x)}{2 d}+\frac{a \cos ^3(c+d x)}{3 d}-\frac{b \log (\cos (c+d x))}{d}\\ \end{align*}

Mathematica [A]  time = 0.0453399, size = 57, normalized size = 0.98 \[ -\frac{3 a \cos (c+d x)}{4 d}+\frac{a \cos (3 (c+d x))}{12 d}-\frac{b \left (\log (\cos (c+d x))-\frac{1}{2} \cos ^2(c+d x)\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[c + d*x])*Sin[c + d*x]^3,x]

[Out]

(-3*a*Cos[c + d*x])/(4*d) + (a*Cos[3*(c + d*x)])/(12*d) - (b*(-Cos[c + d*x]^2/2 + Log[Cos[c + d*x]]))/d

________________________________________________________________________________________

Maple [A]  time = 0.033, size = 61, normalized size = 1.1 \begin{align*} -{\frac{a\cos \left ( dx+c \right ) \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{3\,d}}-{\frac{2\,a\cos \left ( dx+c \right ) }{3\,d}}-{\frac{b \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{2\,d}}-{\frac{b\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(d*x+c))*sin(d*x+c)^3,x)

[Out]

-1/3/d*a*cos(d*x+c)*sin(d*x+c)^2-2/3*a*cos(d*x+c)/d-1/2/d*b*sin(d*x+c)^2-b*ln(cos(d*x+c))/d

________________________________________________________________________________________

Maxima [A]  time = 0.952518, size = 63, normalized size = 1.09 \begin{align*} \frac{2 \, a \cos \left (d x + c\right )^{3} + 3 \, b \cos \left (d x + c\right )^{2} - 6 \, a \cos \left (d x + c\right ) - 6 \, b \log \left (\cos \left (d x + c\right )\right )}{6 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c)^3,x, algorithm="maxima")

[Out]

1/6*(2*a*cos(d*x + c)^3 + 3*b*cos(d*x + c)^2 - 6*a*cos(d*x + c) - 6*b*log(cos(d*x + c)))/d

________________________________________________________________________________________

Fricas [A]  time = 1.78341, size = 126, normalized size = 2.17 \begin{align*} \frac{2 \, a \cos \left (d x + c\right )^{3} + 3 \, b \cos \left (d x + c\right )^{2} - 6 \, a \cos \left (d x + c\right ) - 6 \, b \log \left (-\cos \left (d x + c\right )\right )}{6 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c)^3,x, algorithm="fricas")

[Out]

1/6*(2*a*cos(d*x + c)^3 + 3*b*cos(d*x + c)^2 - 6*a*cos(d*x + c) - 6*b*log(-cos(d*x + c)))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec{\left (c + d x \right )}\right ) \sin ^{3}{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c)**3,x)

[Out]

Integral((a + b*sec(c + d*x))*sin(c + d*x)**3, x)

________________________________________________________________________________________

Giac [A]  time = 1.31767, size = 89, normalized size = 1.53 \begin{align*} -\frac{b \log \left (\frac{{\left | \cos \left (d x + c\right ) \right |}}{{\left | d \right |}}\right )}{d} + \frac{2 \, a d^{2} \cos \left (d x + c\right )^{3} + 3 \, b d^{2} \cos \left (d x + c\right )^{2} - 6 \, a d^{2} \cos \left (d x + c\right )}{6 \, d^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c)^3,x, algorithm="giac")

[Out]

-b*log(abs(cos(d*x + c))/abs(d))/d + 1/6*(2*a*d^2*cos(d*x + c)^3 + 3*b*d^2*cos(d*x + c)^2 - 6*a*d^2*cos(d*x +
c))/d^3